#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	ll n, q; cin >> n >> q;
	ll v; cin >> v;
	vector<ll> a(n + 1);
	for (int i = 1; i <= n; i++) cin >> a[i];
	while (q--) {
		ll x, y; cin >> x >> y;
		a[x] = y;
	}
	ll ans = 0;
	for (int i = 1; i <= n; i++) {
		if (a[i] >= v) ans++;
	}
	cout << ans << endl;
	return 0;
}